﻿//-----------------------------------------------------------------------
// <copyright file="AccountController.cs" company="Simnova LLC">
//     Copyright (c) Simnova LLC. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Simnova.Collaborate.ASPMVC.Controllers
{
    using System;
    using System.Web;
    using System.Web.Mvc;
    using Simnova.Collaborate.ASPMVC.AppServer;
    using System.Collections.Generic;

    public class AccountController : Controller
    {
        public void Signup()
        {
            RenderView("Signup");
        }

        public void Add(string user_screenname, string user_email, string user_password)
        {
            AppServer.CollaborateServiceClient csc = new CollaborateServiceClient();
            AppServer.User user = new User();
            user.ScreenName = user_screenname;
            user.EmailAddress = user_email;
            user.Password = user_password;
            csc.SaveUser(user);
            RenderView("Index");
        }

        protected override void OnActionExecuting(FilterExecutingContext filterContext)
        {
            // Do something.
        }

        protected override void OnActionExecuted(FilterExecutedContext filterContext)
        {
            // Do something.
        }
    }
}
